﻿using Sirenix.OdinInspector;
using System.Collections.Generic;
using UnityEngine;

//子弹结束条件
public class BulletFinishData: MyScriptableObject
{
    //子弹结束类型 0.命中目标  1.帧数到达 2.命中目标和障碍物 3.触发次数到达  4.弹射次数 
    [LabelText("子弹结束类型")]
    [ValueDropdown("BulletFinishModeEnum")]
    public int finishMode;
    [Range(0, 20)]
    [LabelText("子弹最大击中次数")]
    [HideIf("@this.finishMode != 0 && this.finishMode != 2")]
    public int hitMax;
    [MinValue(0)]
    [LabelText("子弹结束帧数")]
    [HideIf("@this.finishMode != 1")]
    public int endFrame;
    [Range(0, 20)]
    [LabelText("子弹最大弹射次数")]
    [HideIf("@this.finishMode != 4")]
    public int ejectionMax;
    [Range(0, 20)]
    [LabelText("子弹最大触发次数")]
    [HideIf("@this.finishMode != 3")]
    public int triggerMax;

#if UNITY_EDITOR
    private List<ValueDropdownItem<int>> BulletFinishModeEnum = new ValueDropdownList<int>()
    {
      { "命中目标", 0 },
      { "帧数到达", 1 },
      { "命中目标和障碍物", 2 },
      { "触发次数到达", 3 },
      { "弹射次数", 4 },
    };
#endif
}